package org.jeecg.modules.app.enums;

import org.jeecg.common.annotation.EnumDict;
import org.jeecg.common.enums.IEnumDict;
import org.jeecg.common.exception.JeecgBootException;

@EnumDict(code ="mp_platform_type_dict", name = "APP平台类型")
public enum MpPlatformTypeEnums implements IEnumDict<MpPlatformTypeEnums> {

    WECHAT("1", "微信小程序", "wechat", ""),

    BAIDU("2", "百度小程序", "baidu", "");

    private String value;

    private String label;

    private String key;

    /**
     * 多语言key
     */
    private String remark;

    MpPlatformTypeEnums(String value, String label, String key, String remark) {
        this.value = value;
        this.label = label;
        this.key = key;
        this.remark = remark;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getKey() {
        return key;
    }

    public String getRemark() {
        return remark;
    }

    public static MpPlatformTypeEnums getEnumByValue(String value){
        for(MpPlatformTypeEnums item: values()){
            if(value.equals(item.value)){
                return item;
            }
        }
        throw new JeecgBootException("没找到对应字典");
    }

}
